package com.ls.uav_backend.model.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

import java.io.Serial;

import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 聊天历史记录 实体类。
 *
 * @author <a href="https://gitee.com/Linkating">LinSkating</a>
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("chat_history")
public class ChatHistory implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 聊天记录主键
     */
    @Id(keyType = KeyType.Generator, value = KeyGenerators.snowFlakeId)
    private Long id;

    /**
     * 确认是同一个聊天记录id
     */
    @Column("chatId")
    private Integer chatId;

    /**
     * 用户 - 0，大模型 - 1
     */
    private Integer type;

    /**
     * 对话内容
     */
    private String message;

    /**
     * 聊天时间
     */
    @Column("chatTime")
    private LocalDateTime chatTime;

}
